package com.example.idlefish.GoodsInfo.parseGson

import com.example.idlefish.GoodsInfo.pojo.Classification
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken

object parseClassification {
    fun  parseClassification(response:String):ArrayList<Classification>{
        val gson = Gson()
        val ttype = object : TypeToken<ArrayList<Classification>>(){}.type
        //val ttype = object : TypeToken<ArrayList<TrainInfo>>(){}.type
        return gson.fromJson(response, ttype)
    }
}